home *** CD-ROM | disk | FTP | other *** search
/ SuperModels in the Rainforest / SuperModels in the Rainforest.iso / rain.dxr / 00006_C Handlers.ls < prev    next >
Encoding:
Text File  |  1995-10-13  |  5.6 KB  |  190 lines

  1. on cGoOnRainForest
  2. end
  3.  
  4. on cRollVideo aRate, aSprite
  5.   set the movieRate of sprite aSprite to aRate
  6. end
  7.  
  8. on cCheckRollover
  9.   global gsRolled, gbVideoUp, gsRolled2
  10.   if (gsRolled <> "Bright") and (rollOver(32) or rollOver(33) or rollOver(34)) then
  11.     repeat with i = 20 to 24
  12.       set the visible of sprite i to 1
  13.     end repeat
  14.     updateStage()
  15.     set gsRolled to "Bright"
  16.   else
  17.     if (gsRolled <> "Dark") and not (rollOver(32) or rollOver(33) or rollOver(34)) then
  18.       repeat with i = 20 to 24
  19.         set the visible of sprite i to 0
  20.       end repeat
  21.       updateStage()
  22.       set gsRolled to "Dark"
  23.     end if
  24.   end if
  25.   if gbVideoUp then
  26.     if rollOver(35) and (gsRolled2 <> "Bright") then
  27.       set the visible of sprite 18 to 1
  28.       repeat with i = 25 to 29
  29.         set the visible of sprite i to 1
  30.       end repeat
  31.       updateStage()
  32.       set gsRolled2 to "Bright"
  33.     else
  34.       if (gsRolled2 <> "Dark") and not rollOver(35) then
  35.         set the visible of sprite 18 to 0
  36.         repeat with i = 25 to 29
  37.           set the visible of sprite i to 0
  38.         end repeat
  39.         updateStage()
  40.         set gsRolled2 to "Dark"
  41.       end if
  42.     end if
  43.   end if
  44. end
  45.  
  46. on cCycleVideo
  47.   global giVideoSprite, giRainForestIndex, gsRainMovieDir
  48.   set giRainForest to 1
  49.   set sTempFile to gsRainMovieDir & "rain" & giRainForestIndex
  50.   set the visible of sprite giVideoSprite to 1
  51. end
  52.  
  53. on cGoPhotoAlbum
  54.   set the visible of sprite 2 to 0
  55.   set the visible of sprite 3 to 0
  56.   set the visible of sprite 4 to 0
  57.   set the visible of sprite 31 to 0
  58.   repeat with i = 5 to 15
  59.     set the visible of sprite i to 0
  60.   end repeat
  61.   repeat with i = 1 to 4
  62.     set the visible of sprite i to 1
  63.   end repeat
  64.   repeat with i = 16 to 31
  65.     set the visible of sprite i to 1
  66.   end repeat
  67. end
  68.  
  69. on cNextShot aDirection
  70.   global giShotIndex, giShotListIndex
  71.   set iMaxShots to count(glShotList) / 2
  72.   if aDirection = 1 then
  73.     if (giShotIndex + 1) > iMaxShots then
  74.       set giShotIndex to 1
  75.       set giShotListIndex to 1
  76.     else
  77.       set giShotIndex to giShotIndex + 1
  78.       set giShotListIndex to giShotListIndex + 2
  79.     end if
  80.   else
  81.     if (giShotIndex - 1) < 1 then
  82.       set giShotIndex to iMaxShots
  83.       set giShotListIndex to (iMaxShots * 2) - 1
  84.     else
  85.       set giShotIndex to giShotIndex - 1
  86.       set giShotListIndex to giShotListIndex - 2
  87.     end if
  88.   end if
  89.   cDisplayShot()
  90. end
  91.  
  92. on cNextShot2 aDirection
  93.   global giShotIndex, giShotListIndex, iambig
  94.   set iambig to 1
  95.   set iMaxShots to count(glShotList) / 2
  96.   if aDirection = 1 then
  97.     if (giShotIndex + 1) > iMaxShots then
  98.       set giShotIndex to 1
  99.       set giShotListIndex to 1
  100.     else
  101.       set giShotIndex to giShotIndex + 1
  102.       set giShotListIndex to giShotListIndex + 2
  103.     end if
  104.   else
  105.     if (giShotIndex - 1) < 1 then
  106.       set giShotIndex to iMaxShots
  107.       set giShotListIndex to (iMaxShots * 2) - 1
  108.     else
  109.       set giShotIndex to giShotIndex - 1
  110.       set giShotListIndex to giShotListIndex - 2
  111.     end if
  112.   end if
  113.   cDisplayShot2()
  114. end
  115.  
  116. on cDisplayShot2
  117.   global giShotIndex, giShotListIndex, grOnScreenRect, grOffScreenRect, glShotList, giTempVid2Cast, giTempVidCast, giShotMov1, giShotMov2
  118.   set iMovSprite1 to 2
  119.   set iMovSprite2 to 3
  120.   set sMovie to getAt(glShotList, giShotListIndex)
  121.   set sMTime to getAt(glShotList, giShotListIndex + 1)
  122.   set iOffStageSprite to (giShotIndex mod 2) + 2
  123.   if sMovie = the fileName of cast giShotMov1 then
  124.     set the movieTime of sprite iMovSprite1 to sMTime
  125.     set tempSprite1 to iMovSprite1
  126.     set tempSprite2 to iMovSprite2
  127.   else
  128.     if sMovie = the fileName of cast giShotMov2 then
  129.       set the movieTime of sprite iMovSprite2 to sMTime
  130.       set tempSprite1 to iMovSprite2
  131.       set tempSprite2 to iMovSprite1
  132.     else
  133.       if iOffStageSprite = iMovSprite1 then
  134.         set tempSprite2 to iMovSprite2
  135.         set tempSprite1 to iMovSprite1
  136.         set the fileName of cast giShotMov1 to sMovie
  137.       else
  138.         set tempSprite2 to iMovSprite1
  139.         set tempSprite1 to iMovSprite2
  140.         set the fileName of cast giShotMov2 to sMovie
  141.       end if
  142.     end if
  143.   end if
  144.   set the movieTime of sprite tempSprite1 to sMTime
  145.   go(the frame + 1)
  146.   go(the frame - 1)
  147.   set the rect of sprite tempSprite2 to grOffScreenRect
  148.   set the rect of sprite tempSprite1 to grOnScreenRect
  149.   spriteBox(tempSprite1, 0, 0, 640, 480)
  150. end
  151.  
  152. on cDisplayShot
  153.   global giShotIndex, giShotListIndex, grOnScreenRect, grOffScreenRect, glShotList, giTempVid2Cast, giTempVidCast, giShotMov1, giShotMov2
  154.   set iMovSprite1 to 2
  155.   set iMovSprite2 to 3
  156.   set sMovie to getAt(glShotList, giShotListIndex)
  157.   set sMTime to getAt(glShotList, giShotListIndex + 1)
  158.   set iOffStageSprite to (giShotIndex mod 2) + 2
  159.   if sMovie = the fileName of cast giShotMov1 then
  160.     set the movieTime of sprite iMovSprite1 to sMTime
  161.     set tempSprite1 to iMovSprite1
  162.     set tempSprite2 to iMovSprite2
  163.   else
  164.     if sMovie = the fileName of cast giShotMov2 then
  165.       set the movieTime of sprite iMovSprite2 to sMTime
  166.       set tempSprite1 to iMovSprite2
  167.       set tempSprite2 to iMovSprite1
  168.     else
  169.       if iOffStageSprite = iMovSprite1 then
  170.         set tempSprite2 to iMovSprite2
  171.         set tempSprite1 to iMovSprite1
  172.         set the fileName of cast giShotMov1 to sMovie
  173.       else
  174.         set tempSprite2 to iMovSprite1
  175.         set tempSprite1 to iMovSprite2
  176.         set the fileName of cast giShotMov2 to sMovie
  177.       end if
  178.     end if
  179.   end if
  180.   set the movieTime of sprite tempSprite1 to sMTime
  181.   go(the frame + 1)
  182.   go(the frame - 1)
  183.   if (the frame > 106) and (the frame < 110) then
  184.     nothing()
  185.   else
  186.     set the rect of sprite tempSprite2 to grOffScreenRect
  187.     set the rect of sprite tempSprite1 to grOnScreenRect
  188.   end if
  189. end
  190.